Hypothetical Datalog : Complexity
نویسنده
چکیده
We present an extension of Horn-clause logic which can hypothetically add and delete tuples from a database. Such logics have been discussed in the literature , but their complexities and expressibilities have remained an open question. This paper examines two such logics in the function-free, predicate case. It is shown, in particular, that augmenting Horn-clause logic with hypothetical addition increases its data-complexity from PTIME to PSPACE. When deletions are added as well, complexity increases again, to EXPTIME. We then augment the logic with negation-as-failure and develop the notion of stratiied hypothetical rulebases. It is shown that negation does not increase complexity. To establish expressibility, we view the logic as a query language for relational databases. It is shown that any typed generic query that is computable in PSPACE can be expressed as a stratiied rulebase of hypothetical additions. Similarly, any typed generic query that is computable in EXPTIME can be expressed as a stratiied rulebase of hypothetical additions and deletions. Neither of these results assumes the data domain is linearly ordered. In this way, we establish the expressive completeness of our logics for queries in PSPACE and EXPTIME, resp.
منابع مشابه
Hypothetical Datalog: Complexity and Expressiblity
We present an extension of Horn-clause logic which can hypothetically add and delete tuples from a database. Such logics have been discussed in the literature, but their complexities and expressibilities have remained an open question. This paper examines two such logics in the function-free, predicate case. It is shown, in particular, that augmenting Horn-clause logic with hypothetical additio...
متن کاملRestricted Predicates for Hypothetical Datalog
Hypothetical Datalog is based on an intuitionistic semantics rather than on a classical logic semantics, and embedded implications are allowed in rule bodies. While the usual implication (i.e., the neck of a Horn clause) stands for inferring facts, an embedded implication plays the role of assuming its premise for deriving its consequence. A former work introduced both a formal framework and a ...
متن کاملDatalog on infinite structures
Datalog is the relational variant of logic programming and has become a standard query language in database theory. The (program) complexity of datalog in its main context so far, on finite databases, is well known to be in EXPTIME. We research the complexity of datalog on infinite databases, motivated by possible applications of datalog to infinite structures (e.g. linear orders) in temporal a...
متن کاملInf-datalog, Modal Logic and Complexities
Inf-Datalog extends the usual least fixpoint semantics of Datalog with greatest fixpoint semantics: we defined inf-Datalog and characterized the expressive power of various fragments of inf-Datalog in [16]. In the present paper, we study the complexity of query evaluation on finite models for (various fragments of) infDatalog. We deduce a unified and elementary proof that global model-checking ...
متن کاملThe Evaluation and the Computational Complexity of Datalog Queries of Boolean Constraint Databases
In the database framework of Kanellakis et al. it was argued that constraint query languages should meet the closed-form requirement, that is, they should take as input constraint databases and give as output constraint databases that use the same type of constraints. This paper shows that the closed-form requirement can be met for Datalog queries with Boolean equality constraints with double e...
متن کامل